
package com.gitee.xhs.sourceIterator;

import com.gitee.xhs.enums.OnTimeEnum;
import com.gitee.xhs.enums.RegularEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author BigHead
 * @date 2022/6/28 17:21
 * @description 指定速率迭代器
 * 包括整点迭代
 * 组数据迭代等功能
 */
public class RateLimitedIterator<IT, T extends AbstractSourceIterator<IT>> extends AbstractRateLimitedIterator<IT, T> {

    private static final Logger logger = LoggerFactory.getLogger(RateLimitedIterator.class);

    public RateLimitedIterator(AbstractSourceIterator<IT> inner) {
        super(inner);
    }

    public RateLimitedIterator(AbstractSourceIterator<IT> inner, Integer groupDataNum, OnTimeEnum onTimeEnum, Integer intervalTime, RegularEnum regularEnum) {
        super(inner, groupDataNum, onTimeEnum, intervalTime, regularEnum);
    }

    @Override
    public boolean hasNext() {
        return inner.hasNext();
    }

    @Override
    public IT next() {
        return prepareIteratorData();
    }

}
